<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.14"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>gpio: Main Page</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="HTML_custom.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="xlogo_bg.gif"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">gpio
   </div>
   <div id="projectbrief">Xilinx SDK Drivers API Documentation</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.14 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',false,false,'search.php','Search');
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('index.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="headertitle">
<div class="title">gpio Documentation</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><p>This file contains the software API definition of the Xilinx General Purpose I/O (<a class="el" href="struct_x_gpio.html" title="The XGpio driver instance data. ">XGpio</a>) device driver.The Xilinx GPIO controller is a soft IP core designed for Xilinx FPGAs and contains the following general features:</p><ul>
<li>Support for up to 32 I/O discretes for each channel (64 bits total).</li>
<li>Each of the discretes can be configured for input or output.</li>
<li>Configurable support for dual channels and interrupt generation.</li>
</ul>
<p>The driver provides interrupt management functions. Implementation of interrupt handlers is left to the user. Refer to the provided interrupt example in the examples directory for details.</p>
<p>This driver is intended to be RTOS and processor independent. Any needs for dynamic memory management, threads or thread mutual exclusion, virtual memory, or cache control must be satisfied by the layer above this driver.</p>
<p><b>Initialization &amp; Configuration</b></p>
<p>The <a class="el" href="struct_x_gpio___config.html" title="This typedef contains configuration information for the device. ">XGpio_Config</a> structure is used by the driver to configure itself. This configuration structure is typically created by the tool-chain based on HW build properties.</p>
<p>To support multiple runtime loading and initialization strategies employed by various operating systems, the driver instance can be initialized in one of the following ways:</p>
<ul>
<li>XGpio_Initialize(InstancePtr, DeviceId) - The driver looks up its own configuration structure created by the tool-chain based on an ID provided by the tool-chain.</li>
<li>XGpio_CfgInitialize(InstancePtr, CfgPtr, EffectiveAddr) - Uses a configuration structure provided by the caller. If running in a system with address translation, the provided virtual memory base address replaces the physical address present in the configuration structure.</li>
</ul>
<dl class="section note"><dt>Note</dt><dd></dd></dl>
<p>This API utilizes 32 bit I/O to the GPIO registers. With less than 32 bits, the unused bits from registers are read as zero and written as don't cares.</p>
<pre>
MODIFICATION HISTORY:</pre><pre>Ver   Who  Date     Changes
<hr/>

1.00a rmm  03/13/02 First release
2.00a jhl  11/26/03 Added support for dual channels and interrupts
2.01a jvb  12/14/05 I separated dependency on the static config table and
                    xparameters.h from the driver initialization by moving
                    _Initialize and _LookupConfig to _sinit.c. I also added
                    the new _CfgInitialize routine.
2.11a mta  03/21/07 Updated to new coding style, added GetDataDirection
2.12a sv   11/21/07 Updated driver to support access through DCR bus
2.12a sv   06/05/08 Updated driver to fix the XGpio_InterruptDisable function
              to properly update the Interrupt Enable register
2.13a sdm  08/22/08 Removed support for static interrupt handlers from the MDD
              file
3.00a sv   11/21/09 Updated to use HAL Processor APIs.
              Renamed the macros XGpio_mWriteReg to XGpio_WriteReg and
              XGpio_mReadReg to XGpio_ReadReg. Removed the macros
              XGpio_mSetDataDirection, XGpio_mGetDataReg and
              XGpio_mSetDataReg. Users should use XGpio_WriteReg and
              XGpio_ReadReg to achieve the same functionality.
3.01a bss  04/18/13 Updated driver tcl to generate Canonical params in
              xparameters.h. CR#698589
4.0   adk  19/12/13 Updated as per the New Tcl API's
4.1   lks  11/18/15 Updated to use cannonical xparameters in examples and
              clean up of the comments, removed support for DCR bridge
              and removed xgpio_intr_example for CR 900381
4.2   sk   08/16/16 Used UINTPTR instead of u32 for Baseaddress as part of
                    adding 64 bit support. CR# 867425.
                    Changed the prototype of XGpio_CfgInitialize API.
4.3   sk   09/29/16 Modified the example to make it work when LED_bits are
                    configured as an output. CR# 958644
      ms   01/23/17 Added xil_printf statement in main function for all
                    examples to ensure that "Successfully ran" and "Failed"
                    strings are available in all examples. This is a fix
                    for CR-965028.
      ms   03/17/17 Added readme.txt file in examples folder for doxygen
                    generation.</pre><pre></pre> </div></div><!-- contents -->
</div><!-- doc-content -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">Copyright &copy; 2015 Xilinx Inc. All rights reserved.</li>
  </ul>
</div>
</body>
</html>
